//
// Created by liushuai on 18-10-29.
//

#ifndef EX18_COORDINATE_H
#define EX18_COORDINATE_H
#include <iostream>
using namespace std;
class Coordinate {
    friend Coordinate operator+(const Coordinate&c1, const Coordinate&c2);
    friend ostream& operator<<(ostream& out,const Coordinate& coor);
    friend Coordinate &operator-(Coordinate& c);
private:
    int X,Y;
public:
    Coordinate& operator++();
    int operator[](int index);
    //后置++
    Coordinate operator++(int);
    Coordinate(int x,int y);
    Coordinate(){
        X = 0;
        Y = 0;
    }
//    Coordinate&operator-();
    int getX();
    int getY();

};


#endif //EX18_COORDINATE_H
